package com.zzwc.vote.www.web;


import com.zzwc.vote.utils.PageUtils;
import com.zzwc.vote.utils.R;
import com.zzwc.vote.www.base.AbstractController;
import com.zzwc.vote.www.service.IVoteEnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 *
 * 企业信息
 * @author weirdor
 * @since 2018-06-06
 */
@RestController
public class VoteEnterpriseController extends AbstractController {

    @Autowired
    private IVoteEnterpriseService voteEnterpriseService;

    /**
     * 所有企业列表
     */
    @RequestMapping(value = "/company/list", method = RequestMethod.GET)
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = voteEnterpriseService.queryPage(params);
        return R.ok().put("data", page);
    }

}
